﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SprintBackLogItemControl.ascx.cs" Inherits="ScrumBox.Web.Views.Sprint.SprintBackLogItemControl" %>
<%@ Import Namespace="MvcContrib"%>
<%@ Import Namespace="ScrumBox.Model"%>

<form method="post" id="new_project" action='<%= Url.Action("save") %>'>
    <script type="text/javascript">
        //Should be refactored out using a "date" class for all datepickers.
        $(document).ready(function() 
        {
          $('#projectStart').datepicker();
        });
    </script>
    
    <% var project = ViewData.Get<Project>();%>

    <label for="projectName">Name</label>
    <%= Html.TextBox("projectName", project.Name ?? "", new { @class="required"}) %>
    <span class="info">The name of the project.</span>
    
    <label for="projectKey">Unique Key</label>
    <%= Html.TextBox("projectKey", project.Key ?? "", new { @class = "required uniqueKey" })%>
    <span class="info">A unique name to identify the project.  Will be used in a url, so it must not contain illegal characters such as spaces or symbols.</span>
    
    <label for="projectStart">Starts</label>        
    <%= Html.TextBox("projectStart", project.StartDate.HasValue ? project.StartDate.Value.ToShortDateString() : "",
                  new { @class = "required" })%>
    
    <label for="projectDesc">Description</label>
    <%= Html.TextArea("projectDesc", project.Description ?? "", 7, 20, new { @class = "required" })%>
    <span class="info">Max 300 characters.  No formatting.</span>
    
    <div class="button-row">
        <input type="submit" id="conf_save" value="Save" class="submit" />
    </span>
</form>